﻿@{
    ViewBag.Title = "For6";
}
<h2>最后结果</h2>
<dl>
    <dt class="header">Header item</dt>
    <!-- The following are generated dynamically from an array -->
    <dd>Item A</dd>
    <dd>Item B</dd>
    <dd>Item C</dd>
</dl>

<h2>代码绑定</h2>
<dl>
    <dt class="header">Header item</dt>
    <!-- ko foreach: myItems -->
    <dd>Item <span data-bind="text: $data"></span></dd>
    <!-- /ko -->
</dl>

<script type="text/javascript">
    ko.applyBindings({
        myItems: ['A', 'B', 'C']
    });
</script>
